﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChessEngine.Engine
{
    internal class TranspositionTable
    {
        private const ulong TABLE_SIZE = 0x0FFFFFF;
        private TranspositionContent[] table = new TranspositionContent[TABLE_SIZE + 1];
        //private List<int> storedIndexes = new List<int>();

        internal TranspositionContent Lookup(ulong hash)
        {
            return table[(int)(hash & TABLE_SIZE)];
        }
        internal void Store(TranspositionContent content)
        {
            int idx = (int)(content.Hash & TABLE_SIZE);

            table[idx] = content;
        }
    }
}
